import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2022-12-04
 * Time: 20:32
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a=scanner.nextInt();
        int b=0;
        StringBuilder str=null;
        while (b<a){

           String  str1=scanner.nextLine();
           str.append(str1);
            b++;
        }
        String str2=null;
        str2= str.toString();
        String[] arr=str2.split(" |\\:");
        for (int i = 0; i < arr.length; i++) {
            int n=1;
            for (int j =i+1 ; j < arr.length; j++) {
                if(arr[i]==arr[j]){
                    n++;
                }
                if(n==a){
                    System.out.println(arr[i]);
                }
            }
        }
    }

}
